package org.millioncall.yueyoga.admin.service.stat;

/**
 * 表格的一行的一列
 * 
 * @author zangjinyu
 * @version 1.0.0
 * 
 */
public class Td extends HtmlTag {
	private String text;

	public Td() {
		super();
	}

	public Td(String text) {
		this();
		this.text = text;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public int getRowspan() {
		String rowspan = getAttribute("rowspan");
		if (rowspan != null) {
			return Integer.valueOf(rowspan);
		}
		return 1;
	}

	public void setRowspan(int rowspan) {
		this.setAttribute("rowspan", String.valueOf(rowspan));
	}

	public int getColspan() {
		String colspan = getAttribute("colspan");
		if (colspan != null) {
			return Integer.valueOf(colspan);
		}
		return 1;
	}

	public void setColspan(int colspan) {
		this.setAttribute("colspan", String.valueOf(colspan));
	}
}
